define([ 'util/Knockout', 'util/ImageUtil' ], function(ko, imageUtil) {

	var socialReference = function SocialReference(data) {
		var self = this;

		self.id = data.id;

		self.username = data.username;

		self.firstName = data.firstName;

		self.lastName = data.lastName;
		
		self.type = data.type;

		self.imageUrl = ko.computed(function() {
			if (self.type == "BOT") {
				return "./resources/images/bot/hal-9000.gif";
			} else
				return imageUtil.computeImageUrl(this.id);
		}, this);
	};

	return socialReference;

});